

main() {
  ITTeacher itTeacher = new ITTeacher();
  itTeacher.doWork();
  itTeacher.fixComputer();
  SoftwareEngineer softwareEngineer = new SoftwareEngineer();
  softwareEngineer.doWork();
  softwareEngineer.fixComputer();
  softwareEngineer.designSoftware();
}
//工作者
abstract class Worker {
  void doWork();//工作者需要工作
}

//工程师
class Engineer extends Worker {
  void doWork() {
    print('工程师在工作');
  }
}

//教师
class Teacher extends Worker {
  void doWork() {
    print('教师在教学');
  }
}

//软件工程师
// class SoftwareEngineer extends Engineer {}
//软件工程师
class SoftwareEngineer extends Engineer
    with CanFixComputer, CanDesignSoftware {}

//建筑工程师
class BuildingEngineer extends Engineer {}

//美术教师
class ArtTeacher extends Teacher {}

//IT教师
// class ITTeacher extends Teacher {}

//IT教师
class ITTeacher extends Teacher with CanFixComputer {}

abstract class CanFixComputer {
  void fixComputer() {
    print('修电脑');
  }
}

abstract class CanDesignSoftware {
  void designSoftware() {
    print('设计软件');
  }
}
